Ok in this tutorial I will be covering:- Combos, List views
Start:
What you need:
1. Mdx
2. mIRC
3. Time
Mdx aliases
needed:
alias mdx { return
path-to-mdx/mdx.dll }
alias ctl { return path-to-ctl/ctl_gen.mdx }
alias bars { return path-to-bars/bars.mdx }
alias views { return path-to-views/views.mdx }
alias icon { return path-to-icons/ $+ $1- }
1. Combos
Ok well I'm going
to explain how to use combos with mdx. I will be using an example dialog
to show you how it works.
Start by making
your start of your dialog now what I'm going to tell you is very important
you must not set the combo box to drop the SetControlMDX will do that for you
ok.
dialog example {
title "combo example"
size -1 -1 63 67
option dbu
combo 1, 1 1 60 50, size
button "Button", 2, 1 52 37 12, ok
}
ok now you have
done the start of you dialog we are going to move onto the init this is
where you need to know a bit about mdx to understand
on *:dialog:example:init:*
{
;1) Sets mIRC Version onto mdx
;2) Marks the dialog for MDX
dll $mdx SetMircVersion $version
dll $mdx MarkDialog $dname
dll $mdx SetDialog $dname
;This is the part that sets the combo to drop down
dll $mdx SetControlMDX $dname 1 ComboBoxEx drop > $views
;This sets the icon size on the combo
did -i $dname 1 1 iconsize small
;ok this is the important part when setting the icons and the text for your comb
;This first bit sets the icon. I Made shore that I add the two icon part
because enables you
;to set a different icon for each line of text.
;This is where You place you combos id Example:
did -i $dname (here) 1 seticon 0 $icon(icon/path)
did -i $dname 1 1 seticon 0 $icon(icon/path)
did -i $dname 1 1 seticon 0 $icon(icon/path)
;Now on to the text part you have to make shore you get the icons to display
right for each text
;the id is the same as the icons id but then you have to set it so each text has
it's own icon
;to set the icon for Text1 you need to do this Example: did -a $dname
(id) (icon number) (icon overlay) 0 0 Combo Text
:Well if you wanted icon one to be on
text one you put 1 and the overlay 1
;the overlay is just the icon that appears when you click it
did -a $dname 1 1 1 0 0 Combo Text1
did -a $dname 1 2 2 0 0 Combo Text2
}
Your finished
Product should look like this:
2. List Views
Moving on
list views are used by many people but I think the
question on many peoples mind is how the hell do I add icons
ok well then I'll tell you first you make a you starting part of your dialog
like so
dialog example2 {
title "List View example"
size -1 -1 89 91
option dbu
list 1, 1 3 87 73, size
button "Button", 2, 49 78 37 12, ok
}
ok that the
starting part out of the way moving on to the init
on *:dialog:example2:init:0: {
;1) Sets mIRC Version onto mdx
;2) Marks the dialog for MDX
dll $mdx SetMircVersion $version
dll $mdx MarkDialog $dname
;this sets the List View i add grid cos i think grids look better with icons
dll $mdx SetControlMDX $dname 1 ListView report single grid > $views
;Sets List view header
did -i $dname 1 1 headerdims 200
did -i $dname 1 1 headertext Example
;This icon command sets the icons for each test or you could just use one if you
just
;want to use 1 icon for the whole list view ok
did -i $dname 1 1 seticon list $icon(icon\path)
did -i $dname 1 1 seticon list $icon(icon\path)
;Now on to setting the text in the list view you should know how to
;set the id because it's the same as on the combo this +b means the
;icon will be displayed on the right and the second number is witch icon you
want to be displayed don that text
;Example: did -a example2 1 +b (icon number) Text1
did -a example2 1 +b 1 Text1
did -a example2 1 +b 2 Text2
}
You finishing
list view should look soothing like this:
Well dudes that's all I got for you in the first Part stay tuned for the second part
Mike Bailey
************************************
Contact Info
E-mail:Mykz
IRC: irc.chatchannel.org #scriptaz,#schat
Thanks to:
pr0n^king - For getting me into Tutorial writing
Url for mdx:
MDX
***********************************